<template>
  <div class="approveds">
    <div class="apprHeards">
      <p>审核通过</p>
    </div>
    <div class="apprContent">
      <p>照片 
        <span>
          <img class="image1" src="../imgs/more.png" width="10px" alt="">
          <img class="image" :src="'/api/'+Objs.photograph" width="60px" height="60px" alt="">
        </span>
        </p>
      <hr>
      <p>姓名<img class="image1" src="../imgs/more.png" width="10px" alt=""><span>{{Objs.userName}}</span></p>
      <hr>
      <p>性别<img class="image1" src="../imgs/more.png" width="10px" alt=""><span>{{Objs.userSex}}</span></p>
      <p>工作单位<img class="image1" src="../imgs/more.png" width="10px" alt=""><span>{{Objs.unionName}}</span></p>
      <hr>
      <p>工号<img class="image1" src="../imgs/more.png" width="10px" alt=""><span>{{Objs.xgno}}</span></p>
      <p>参加工作时间<img class="image1" src="../imgs/more.png" width="10px" alt=""><span>{{Objs.workTime | formatDate}}</span></p>
      <p>身份证号码<img class="image1" src="../imgs/more.png" width="10px" alt=""><span>{{Objs.idcard}}</span></p>
      <hr>
      <p>家庭住址<img class="image1" src="../imgs/more.png" width="10px" alt=""><span>{{Objs.userAddress}}</span></p>
      <hr>
      <p>联系电话<span>（住宅）13333333333<i class="iconfont">&#xe6f7;</i></span></p>
      <hr>
      <p><span>（手机）{{Objs.userMobile}}<i class="iconfont">&#xe6f7;</i></span></p>
    </div>
  </div>
</template>

<script>
import api from "@/data/api/index.js";
export default {
  //过滤器
		filters:{
			formatDate(date) {
				const nDate = new Date(date)
				const y = nDate.getFullYear()
				const m = (nDate.getMonth()+1).toString().padStart(2,0)
				const d = nDate.getDate().toString().padStart(2,0)
				return y+'-'+m+'-'+d
			}
		},
  data(){
    return{
      id: '',
      Objs: {}
    }
  },
  mounted () {
    this.id = this.$route.query.tdata
    this.getAuditedMembers(this.id)
  },
  methods: {
    getAuditedMembers(id) {
      api.auditedMembers(id).then(res => {
        if(res.userSex!='男' && res.userSex!='女'){
          res.userSex=res.userSex == "01" ? "男" : "女";
        }
        this.Objs = res
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.approveds{
  width: 100%;
  height: 100%;
  .apprHeards{
    width: 100%;
    height: 60px;
    background: linear-gradient(135deg, orange, red);
    p{
      font-size: 20px;
      color: #fff;
      line-height: 60px;
      text-align: center;
    }
  }
  .apprContent{
    width: 80%;
    height: 100%;
    margin: 15px auto;
    p{
      line-height: 61px;
      font-weight: bold;
      color: rgb(103,103,103);
      .image1{
        margin-top: 24px;
        margin-left: 10px;
      }
      .image{
        border-radius: 30px;
      }
      img{
        margin-top: -5px;
        float: right;
      }
      span{
        float: right;
        i{
          color: rgb(183,28,36);
          margin-left: 5px;
        }
      }
    }
  }
}
</style>